<template>
    <div class="forbidden-container">
        <div class="error-content">
            <div class="error-icon">
                <svg width="200" height="200" viewBox="0 0 200 200" fill="none">
                    <circle cx="100" cy="70" r="10" fill="#1465E1"/>
                    <circle cx="100" cy="100" r="90" fill="#1465E1" fill-opacity="0.1" stroke="#1465E1" stroke-width="4"/>
                    <line x1="100" y1="90" x2="100" y2="130" stroke="#1465E1" stroke-width="6" stroke-linecap="round"/>
                    <circle cx="100" cy="150" r="6" fill="#1465E1"/>
                </svg>
            </div>
            <div class="error-info">
                <h1 class="error-code">403</h1>
                <h2 class="error-title">访问被拒绝</h2>
                <p class="error-description"> 抱歉，您没有权限访问此页面。这可能是因为您的账户权限不足或会话已过期。 </p>
            </div>
            <div class="action-buttons">
                <button @click="goHome" class="btn-primary"> 返回首页 </button>
                <button @click="goBack" class="btn-secondary"> 返回上一页 </button>
            </div>
        </div>
    </div>
</template>

<script>
export default {
  name: 'ForbiddenPage',
  methods: {
    goHome() {
      this.$router.push('/login');
    },
    goBack() {
      this.$router.back();
    },
  },
  mounted() { }
}
</script>

<style scoped>
.forbidden-container { min-height: 100vh; background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); display: flex; align-items: center; justify-content: center; padding: 20px; background-color: #fff; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.error-content { text-align: center; max-width: 600px; padding: 40px; background: white; border-radius: 16px; box-shadow: 0 10px 30px rgba(20, 101, 225, 0.1); border: 1px solid rgba(20, 101, 225, 0.1); }
.error-icon { margin-bottom: 30px; }
.error-code { font-size: 120px; font-weight: 700; color: #1465E1; margin: 0; line-height: 1; background: linear-gradient(135deg, #1465E1, #0d4a9e); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.error-title { font-size: 32px; color: #2d3748; margin: 10px 0; font-weight: 600; }
.error-description { font-size: 16px; color: #718096; line-height: 1.6; margin: 20px 0 30px; }
.action-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; margin: 30px 0; }
.btn-primary, .btn-secondary, .btn-link { padding: 12px 24px; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; }
.btn-primary { background: #1465E1; color: white; }
.btn-primary:hover { background: #0d4a9e; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(20, 101, 225, 0.3); }
.btn-secondary { background: #e2e8f0; color: #4a5568; }
.btn-secondary:hover { background: #cbd5e0; transform: translateY(-2px); }
.btn-link { background: transparent; color: #1465E1; text-decoration: underline; }
.btn-link:hover { color: #0d4a9e; text-decoration: none; }

@media (max-width: 768px) {
  .error-content {
    padding: 30px 20px;
    margin: 20px;
  }
  
  .error-code {
    font-size: 80px;
  }
  
  .error-title {
    font-size: 24px;
  }
  
  .error-description {
    font-size: 16px;
  }
  
  .action-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .contact-info {
    flex-direction: column;
    gap: 5px;
  }
}

/* 动画效果 */
.error-icon {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.error-code {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}
</style>